﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace test_6_17
{
    public partial class Form10 : Form
    {
        public Form10()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Cal2 c=new Cal2();
            int r = 0;
            switch(operation.Text)
            {
                case "+":
                    r= c.Add(int.Parse(num1.Text),int.Parse(num2.Text)); 
                    break;
                case "-":
                    r=c.Sub(int.Parse(num1.Text), int.Parse(num2.Text));
                    break;
                case "*":
                    r = c.Mul(int.Parse(num1.Text), int.Parse(num2.Text));
                    break;
                case "/":
                    r = c.Div(int.Parse(num1.Text), int.Parse(num2.Text));
                    break;
            }
           result.Text = r.ToString();
        }
    }
}
